home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earcd / grafica / video easel / camrexx / tube-worms.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-30  |  877b  |  30 lines

  1. /* Tube-Worms:    By an idea of Toffoli, converted to CAMRexx by THOR */
  2.  
  3. MakeAlgorithm:
  4.    PLANEALGORITHM moore centers
  5. return
  6.  
  7. /* parameters.alarm */
  8. MakePlane:
  9.    if plane=0 then; do
  10.       if alts=0   then  SETPLANE on       /* emerge if timer over */
  11.       else              SETPLANE off
  12.    end
  13.    if plane=1 then; do
  14.      sum8=north+south+west+east+n_west+n_east+s_west+s_east /* add up */
  15.      if sum8>=parameters.alarm then    SETPLANE on          /* ring alarm */
  16.      else                              SETPLANE off
  17.    end
  18.    if plane=2 | plane=3 then; do
  19.       if alt & alt_ then               SETPLANES 12         /* set timer */
  20.       else; do
  21.          newcenter=centers
  22.          if newcenter>0 then newcenter=newcenter-1          /* decrement */
  23.          newcenter=newcenter*4         /* set in planes 2..3 */
  24.          SETPLANES newcenter
  25.       end
  26.    end
  27. return
  28.  
  29.  
  30.